﻿Option Explicit On ' Make sure all items are explicitly declared
Option Strict On ' Be Very Strict about things here!
Namespace ZuneCardr
    ''' <summary>Track</summary>
    ''' <author>Comentsys</author>
    ''' <version>1.0.0</version>
    ''' <created>1st February 2009</created>
    ''' <modified>1st February 2009</modified>
    ''' <remarks>Track Data</remarks>
    Public Class Track

        ' Private Members

        Private strID As String
        Private strName As String
        Private strGenre As String
        Private _Album As Album
        Private strClipURL As String
        Private strBuyURL As String
        Private strSendURL As String
        Private strSetFavURL As String
        Private blnSelected As Boolean = True

        ' Public Methods

        ''' <summary>Constructor</summary>
        ''' <param name="Element">Element to Parse</param>
        Public Sub New(ByRef Element As XElement)
            strID = Element.<id>.Value
            strName = Element.<label>.Value
            strGenre = Element.<genre>.Value
            _Album = New Album(Element.<album>)
            strClipURL = Element.<clipURL>.Value
            strBuyURL = Element.<buyURL>.Value
            strSendURL = Element.<sendURL>.Value
            strSetFavURL = Element.<setFavURL>.Value
        End Sub

        ' Public Properties

        ''' <summary>ID</summary>
        ''' <returns>Zune ID</returns>
        Public ReadOnly Property ID() As String
            Get
                Return Trim(strID)
            End Get
        End Property

        ''' <summary>Name</summary>
        ''' <returns>Name Text</returns>
        Public ReadOnly Property Name() As String
            Get
                Return Trim(strName)
            End Get
        End Property

        ''' <summary>Genre</summary>
        ''' <returns>Genre Text</returns>
        Public ReadOnly Property Genre() As String
            Get
                Return Trim(strGenre)
            End Get
        End Property

        ''' <summary>Album</summary>
        ''' <returns>Track Album</returns>
        Public ReadOnly Property Album() As Album
            Get
                Return _Album
            End Get
        End Property

        ''' <summary>ClipURL</summary>
        ''' <returns>URL Text</returns>
        Public ReadOnly Property ClipURL() As String
            Get
                Return strClipURL
            End Get
        End Property

        ''' <summary>BuyURL</summary>
        ''' <returns>URL Text</returns>
        Public ReadOnly Property BuyURL() As String
            Get
                Return strBuyURL
            End Get
        End Property

        ''' <summary>SendURL</summary>
        ''' <returns>URL Text</returns>
        Public ReadOnly Property SendURL() As String
            Get
                Return strSendURL
            End Get
        End Property

        ''' <summary>SetFavURL</summary>
        ''' <returns>URL Text</returns>
        Public ReadOnly Property SetFavURL() As String
            Get
                Return strSetFavURL
            End Get
        End Property

        ''' <summary>Selected</summary>
        ''' <returns>Selected Value</returns>
        ''' <remarks>Use on ZuneCard Value</remarks>
        Public Property Selected() As Boolean
            Get
                Return blnSelected
            End Get
            Set(ByVal Value As Boolean)
                blnSelected = Value
            End Set
        End Property

    End Class
End Namespace
